import React, { Component } from 'react'
import { Route, Switch} from 'react-router-dom'

import Home from '../container/Home'
import Sort from '../container/Sort'
import View from '../container/View'
import Mine from '../container/Mine'
import NotFound from '../container/NotFound'
import Login from '../container/Login'
import Forget from '../container/Login/SubPage/Forget'
import Passwords from '../container/Login/SubPage/Passwords'
import Register from '../container/Login/SubPage/Register'
import Success from '../container/Login/SubPage/Success'
import LoginIndex from '../container/Login/SubPage/LoginIndex'

import MineIndex from '../container/Mine/SubPage/MineIndex'
import About from '../container/Mine/SubPage/About'
import Logout from '../container/Mine/SubPage/Logout'
import MessageCenter from '../container/Mine/SubPage/MessageCenter'
import MineAdvice from '../container/Mine/SubPage/MineAdvice'
import MineBack from '../container/Mine/SubPage/MineBack'
import MineBrowse from '../container/Mine/SubPage/MineBrowse'
import MineCollect from '../container/Mine/SubPage/MineCollect'
import MineDownload from '../container/Mine/SubPage/MineDownload'
import MineOrder from '../container/Mine/SubPage/MineOrder'
import MineSay from '../container/Mine/SubPage/MineSay'
import MineSign from '../container/Mine/SubPage/MineSign'
import MineSubmit from '../container/Mine/SubPage/MineSubmit'
import Setting from '../container/Mine/SubPage/Setting'
import MineCourse from '../container/Mine/SubPage/MineCourse'

import HomeIndex from '../container/Home/SubPage/HomeIndex'
import AccountCourse from '../container/Home/SubPage/AccountCourse'
import DetailsCourse from '../container/Home/SubPage/DetailsCourse'
import DetailsList from '../container/Home/SubPage/DetailsList'
import HomeRecommend from '../container/Home/SubPage/HomeRecommend'
import RecommendCenter from '../container/Home/SubPage/RecommendCenter'
import Search from '../container/Home/SubPage/Search'

import SortIndex from '../container/Sort/SubPage/SortIndex'
import PublicPeople from '../container/Sort/SubPage/PublicPeople'
import SortScreen from '../container/Sort/SubPage/SortScreen'

import ViewIndex from '../container/View/SubPage/ViewIndex'
import HotSubject from '../container/View/SubPage/HotSubject'
import Publish from '../container/View/SubPage/Publish'
import SubjectRecommend from '../container/View/SubPage/SubjectRecommend'

import Examination from '../container/Home/SubPage/HomeIndex/HomeList/Examination'
import Finance from '../container/Home/SubPage/HomeIndex/HomeList/Finance'
import Medical from '../container/Home/SubPage/HomeIndex/HomeList/Medical'
import Occupation from '../container/Home/SubPage/HomeIndex/HomeList/Occupation'

export default class AppRouter extends Component{
  render(){
    return(
      <Switch>
        <Home path='/home'>
          <HomeIndex path='/home'>
            <Route exact path='/home' component={Examination}></Route>
            <Route path='/home/finance' component={Finance}></Route>
            <Route path='/home/medical' component={Medical}></Route>
            <Route path='/home/occupation' component={Occupation}></Route>
          </HomeIndex>
        </Home>
        <Route path='/accountcourse' component={AccountCourse}></Route>
        <Route path='/detailscourse' component={DetailsCourse}></Route>
        <Route path='/detailslist' component={DetailsList}></Route>
        <Route path='/homerecommend' component={HomeRecommend}></Route>
        <Route path='/recommendcenter' component={RecommendCenter}></Route>

        <Route path='/search' component={Search}></Route>

        <Sort path='/sort'>
          <Route exact path='/sort' component={SortIndex}></Route>
          <Route path='/sort/publicpeople' component={PublicPeople}></Route>
          <Route path='/sort/sortscreen' component={SortScreen}></Route>
        </Sort>
        <View path='/view'>
          <Route exact path='/view' component={ViewIndex}></Route>
          <Route path='/view/hotsubject' component={HotSubject}></Route>
          <Route path='/view/publish' component={Publish}></Route>
          <Route path='/view/subjectrecommend' component={SubjectRecommend}></Route>
        </View>
        <Mine path='/mine'>
          <Route exact path='/mine' component={MineIndex}></Route>
          <Route path='/mine/about' component={About}></Route>
          <Route path='/mine/logout' component={Logout}></Route>
          <Route path='/mine/messagecenter' component={MessageCenter}></Route>
          <Route path='/mine/mineadvice' component={MineAdvice}></Route>
          <Route path='/mine/mineback' component={MineBack}></Route>
          <Route path='/mine/minebrowse' component={MineBrowse}></Route>
          <Route path='/mine/minecollect' component={MineCollect}></Route>
          <Route path='/mine/minecourse' component={MineCourse}></Route>
          <Route path='/mine/minedownload' component={MineDownload}></Route>
          <Route path='/mine/mineorder' component={MineOrder}></Route>
          <Route path='/mine/minesay' component={MineSay}></Route>
          <Route path='/mine/minesign' component={MineSign}></Route>
          <Route path='/mine/minesubmit' component={MineSubmit}></Route>
          <Route path='/mine/setting' component={Setting}></Route>
        </Mine>
        <Login path='/login'>
          <Route exact path='/login' component={LoginIndex}></Route>
          <Route path='/login/forget' component={Forget}></Route>
          <Route path='/login/passwords' component={Passwords}></Route>
          <Route path='/login/register' component={Register}></Route>
          <Route path='/login/success' component={Success}></Route>
        </Login>
        <Route component={NotFound}></Route>
      </Switch>
    )
  }
}
